package net.vinote.smart.platform.service.handler;

import net.vinote.smart.platform.module.database.bo.BizObject;
import net.vinote.smart.platform.service.dw.handler.CommonHandler;
import net.vinote.smart.platform.service.dw.handler.HandlerPerimissionAnnotation;
import net.vinote.smart.platform.service.util.Permission;
import net.vinote.smart.platform.service.util.Permission.PermissionEnum;

@HandlerPerimissionAnnotation(
		insert = @Permission(PermissionEnum.SMART_DW_EVENT_INSERT),
		update = @Permission(PermissionEnum.SMART_DW_EVENT_UPDATE),
		query = @Permission(PermissionEnum.SMART_DW_EVENT_QUERY),
		delete = @Permission(PermissionEnum.SMART_DW_EVENT_DELETE))
public class DataWindowEventHandler extends CommonHandler {

	@Override
	public void initDisplayForEdit(BizObject bo) {
		setReadOnly("Event", true);
	}

	@Override
	public void initDisplayForAdd(BizObject bo) {
		bo.setAttribute("DoNo", request.getParameter("doNo"));
		bo.setAttribute("fieldCode", request.getParameter("fieldCode"));
	}

}
